GROOVY-6741: Runtime coercion of traits should use getPlainNodeReference