Fix: Nesting an object in a template causes the template to become non-abstract

fixes #7537