diff --git a/reference.go b/reference.go
index <HASH>..<HASH> 100644
--- a/reference.go
+++ b/reference.go
@@ -148,6 +148,9 @@ func (r *Ref) Inherits(child Ref) (*Ref, error) {
 		return &child, nil
 	}
 
-	ref, _ := New(parentURL.ResolveReference(childURL).String())
+	ref, err := New(parentURL.ResolveReference(childURL).String())
+	if err != nil {
+		return nil, err
+	}
 	return &ref, nil
 }
fixes #<I> fixes wrong name detection for circular ancestry