fixing the bug i introduced when refactoring "template". Now "primitive properties" will always target the right place in the template. There are still a couple of bugs related to other types of properties. The fix is on the way