update condition to add a resource to resource group

Before this update, I was seeing cases (e.g. http://fpaste.org/43620/38069473/ ) where a resource was not getting added to a resource group.