Fixed problems with virtual templates by delaying a lot more compilation and making sure that vtables get added to correctly when new parameter sets are encountered.