Handle case where ancestor of target is missing

Currently if an ancestor of a patch target is missing `NoMethodError` is raised rather than `MissingTargetException`.