diff --git a/lib/solargraph/pin/reference.rb b/lib/solargraph/pin/reference.rb
index <HASH>..<HASH> 100644
--- a/lib/solargraph/pin/reference.rb
+++ b/lib/solargraph/pin/reference.rb
@@ -12,6 +12,7 @@ module Solargraph
 
       def resolve api_map
         unless @resolved
+          @resolved = true
           @name = api_map.find_fully_qualified_namespace(@name, pin.namespace)
         end
       end
Avoid infinite recursion when resolving reference pins.