Theme designer not working at all on preview (BugId:96412)

I know, loading JS at the top of the page sucks a lot, but that's the only way to fix an issue without a huge refactoring of how ThemeDesigner page is built.