FIX: Template manifest flushing, NEW: Flush on every build

Fixes #3093 - template manifest not being regenerated on /dev/build/?flush=1