fixes #6881 -  check if in rake when validating template changes

assert_valid tmplt