DDF-416 Correct logic to break out of loop on success

Decided not to change logic for resource size as suggested by Jeff Vettraino, since there is possibly a case where we want an input metacard that doesn't have an associated URI but it otherwise valid. If we don't want to create a metacard without a valid URI the logic should be completely different.