I also wouldn't have any problem with someone who needed to rejoin their group after a potty emergency, and I don't think most would. Now, if it's a short, 15 minute line then it would be easier for everyone if you all just got out of line and got back in, but if you're waiting 90 minutes for RSR or IJ with a small child, I think it's reasonable to leave and rejoin. I wish they would put bathrooms in the long queues. It's true that some lines are narrow and would be difficult to do this in, but on most rides by the time you get to the narrow part of the queue it's a pretty short wait. For example, Matterhorn's "overflow" waiting area is a roped off line that would be easy to exit, and by the time you get to the narrow walkways it's probably less than a 10 minute wait. If you had to leave while your group was in the roped off line, I would just tell your group that if they get to the end of the rope line, to just let people pass them until you return.
Now I'm sure people will be upset at this, but I was once in a group where this happened with an adult (lactose intolerant and unknowingly ate something she shouldn't have shortly before getting in a long line at IJ). Now since she's an adult, she had resolved that if it was difficult/unreasonable to rejoin the group she would sit out. But when the CM at the ride entrance saw her looking at the outdoor queue trying to see where we were, the CM guessed what was happening and offered to let her wait at the entrance and rejoin us when we got to the bottom of the ramp. If the CM was willing to make that suggestion for an adult who hadn't even asked, I'm sure most would also be helpful and understanding for a small child.