Fix for assigns(:..) resetting template assertions

When calling assigns(:...) or cookies(:...), template assertions would be reset, which they obviously shouldn't be.
Merge pull request #17642 from tgxworld/fix_template_assertion_on_assigns

Fix for assigns(:..) resetting template assertions