ResourceCollection#add to act on internal @resources directly

Using `ResourceCollection#[]` to check for existing resources could
potentially return an incorrect resource and it would wrongly determine
a resource was already in the collection. This change will ensure a resource
added is only considered present if its `resource.resource_name` object
is an exact match in the internal `@resources` hash.

Fixes #2306.