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