Added option to merge template with existing restrictions

Closes #1700