Applying template with on demand restricting will enabled on demand restricting setting

Refs #1727