The memory footprint of these objects should be evaluated. Or we can just remove them. I believe in most cases we can safely remove these as they are part of a private structure.
Due to 'templates' having a public getter, we can't remove that one without updating the getter function to provide a fallback. Right now callers are allowed to unconditionally try accessing template keys on the returned object. We shouldn't start returning null there.