       if pointer.indexOf(uri + "/") != 0
         schema.$ref = uri
         if (schema = @resolve_uri(uri, scope))?
-          @compile_references context, schema
+          @_compile_references context, schema
         else
           # Store the unresolvable reference so we can try to resolve
           # it again after having traversed the all schemas.
           @unresolved[pointer] = {scope, uri}
+
+
+    reference_container: (context, schema) ->
+      if @test_type "array", schema
+        for definition, i in schema
+          if @test_type "object", definition
+            @_compile_references context.child(i), definition
+
+      else if @test_type("object", schema)
+        @_compile_references context, schema
+      else
+        # No action required.
+
 
 
     compile: (context, schema) ->


  class Validator

    @attributes:
      patternProperties:
        modifiers: [ "additionalProperties" ]

      additionalProperties:
        modifiers: [
          "properties"
          "patternProperties"
        ]

      items:
        modifiers: [ "additionalItems" ]

      minimum:
        modifiers: [ "exclusiveMinimum" ]
      maximum:
        modifiers: [ "exclusiveMaximum" ]

    SCHEMA_URI = uri


      # them in the context, so the primary attribute handler can act
      # on them.
      context.modifiers = {}

      if (modifiers = Validator.modifiers[attribute])?
        for key in modifiers
          context.modifiers[key] = schema[key]

