Maint: Fix a #4655 introduced log inconsistency
When we moved code from the compiler to parser/resource, we lost
a conditional that prevented defined resources from gaining containment
edges to stages. Adding a stage to a defined resource was usually
harmless, but it violated the invariant of "resources should only have
exactly one container as their direct parent", producing a 50% chance of
a malformed containment path in log messages.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>