I have not had this problem and I am not sure what your situation is exactly, but have you thought of putting some velcro on the visor and then maybe some on the roof? That might take care of the problem?
It sounds like what you are saying is that the visor flips down into position (like it would be if you had sun in your eyes and flipped it down)? Is that what it's doing? If so, that is so strange. Have you tried tightening the screws that hold it to the roof. I know it sounds lame, but there just does not seem to be anything else I could think of.
Anyway, I would try the velcro thing if nothing else works. Good luck.