Scan schemas for unresolved $ref references and sub-schemas