Moodle needs a separate YUI load function. With "Enable AJAX" the YUI libraries loading function can't be used from other projects. When you use a loading mechanism of your own and "Enable AJAX" is turned on you get an error due to doupble loeaded YUI files.
I noticed that with the coloured line in the lines theme I am working on.
This is a major blocker when YUI support for 3rd party development should be pushed with Moodle 1.7.