Use collector typing to ensure correct sequencing of instance and templates

With PE 3.3.0 the template defines would run before the Instance is setup.
Using the collector type we ensure correct sequencing.