Re-adds some lines from 917ede308b

Some lines from 917ede308b79352d4b0df3e03338555befda9ff0 were clobbered
by the generic templates merge.

In particular, gets rid of doubly-loading some JS and CSS files.