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.

Fixes #2940