I'm sure Raymond is correct, and here in Kansas City he's on the conservative side. So, if your budget isn't going to accommodate an $3,000-4,000 bathroom upgrade, perhaps you'd like another suggestion.
Have you tried putting in a hinge-doorstop? It's a little device that fits over the pin in one of the door's hinges -- usually the top one -- and it can be custom-set to stop the door from opening whenever it reaches a certain swing depth. It will cost you about $5.
Perhaps if you can get the door to stop BEFORE it hits the toilet, the problem won't seem so major. Just a thought.