I have a small web application which uses themes. The themes work on host, so on preinit, if the host = a, load x theme, if the host = b, load y theme.
Are you setting the Theme early enough in your code? A Theme must be applied to a page very early in the request lifecycle, in the PreInit event, if you do it in code-behind.