Deep equality check for collection membership