Wait, I left something off in the if-statements. There should be endif() commands at the end of each if line. When an if-statement occurs, everything from that point until the endif() happens only if the if-statement is true. If you leave off the endif(), it will think the whole rest of the event is part of the if-statement.
To keep the clothes from unmapping if they're on the doll, you would need to use if statements. Assuming that the doll's body is #0, something like this would work...