patch inherited resource groups for new resource

Fix legacy bug of inheriting parent's resource groups when creating a new resource under a container