fixing the found duplicate and different resources flow

Duplicate and different resources are not detected in case duplicate (but equal) resources exist.
Fixes issue #31