   return unless candidates?
 
   for version, resolvedPath of candidates
-    if Module._cache.hasOwnProperty(resolvedPath) or resolvedPath.indexOf(cache.resourcePath) is 0
+    if Module._cache.hasOwnProperty(resolvedPath) or isCorePath(resolvedPath)
       return resolvedPath if satisfies(version, range)
 
   return


  cache.registered = true
  cache.resourcePath = resourcePath
  registerBuiltins(devMode)

  return

  ranges: {}
  registered: false
  resourcePath: null
  resourcePathWithTrailingSlash: null

# isAbsolute is inlined from fs-plus so that fs-plus itself can be required
# from this cache.
