Fixed a bug preventing proper master template on-the-fly rebuilds.