Fixed: if a "$ref" pointer pointed to another "$ref" pointer, then the first pointer would not be fully resolved