I figured out my problem.
I was foolishly placing the physical files for the DNN install inside my main web. So, on an existing website, I was trying to implement DNN as a subweb, and was storing the files like this:
Main Site: C:\Inetpub\wwwroot
DNN: C:\Inetpub\wwwroot\dnn
I had then created a virtual directory/application called "portal" and pointed it to C:\inetpub\wwwroot\dnn. This setup does not compile correctly! (Although the existing pages do run OK).
Once I split the physical files out like this:
Main Site: C:\Inetpub\wwwroot\main
DNN: C:\Inetpub\wwwroot\dnn
...things work fine. Sometimes it just helps to type it all out in a forum, and things become clearer.
Hope that helps somebody!