Aftermarket? Wow.....please post photos.
My suggestion would be to open the roof full, and then either put something down and stand on the seats up through the open roof, or protect the body of the car (roll the door glass up and trap a heavy moving blanket so it hangs down the door) and use a ladder. With the roof open, inspect the left and right tracks for debris, and damage. If there is some sort of wind deflector that pops up at the front of the roof opening, make sure that how ever it springs up, and is pushed down by the closing roof, is all functional, not broken, and not got debris stuck in it.
From outside the roof/body (in other words, not stand up through the sunroof opening, close the roof slowly and watch what it's attempting to do as it gets nearly closed.
Typically a sliding roof will push down a wind deflector as it moves forward that final couple of inches (our factor roofs have no deflector), and then at the rear of the roof there is some sort of lifting mechanism or a ramp on each side, that raises the rear of the roof up, and flush with the car's roof. Issues in these 2 areas will keep the roof from closing fully.
Some people will park a car with the roof either fully, or partially open, and then tree debris will fall into areas of the rails. This debris may not affect the roof right away, but eventually will, and since it's a behavior that the owner has, they will keep leaving the roof open, allowing more and more debris to fall into the roof. So that's why your first check is always for debris, and old grease that has become dry, and almost like clay.