I'm still not sure why it's happening in the first place, but I've added the solution to the Installation FAQ:
http://moodle.org/doc/?file=faq.html#fixdirroot
Installing and upgrading help
1.8.1 to 1.9 upgrade problem in config.php
Esta discusión ha sido bloqueada, por lo que Usted ya no puede responder a ella.