Stop invalid calls to Registry

This code was resulting in a call for
/v1/images/<namespace>/<repository>/ancestry which the Registry
doesn't understand. Furthermore, it was masking the original
error.
Merge pull request #2941 from codeaholics/2940-invalid-registry-calls

Stop invalid calls to Registry