[#421] Fix for checking if we're in legacy templates mode for tests