Original Article
Index: lib/xl_suite/auto_scope.rb
===================================================================
--- lib/xl_suite/auto_scope.rb  (revision 4088)
+++ lib/xl_suite/auto_scope.rb  (working copy)
@@ -12,13 +12,16 @@
         method_body = <<-EOF
           def self.#{scope_name}
             returning(Object.new) do |proxy|
+             proxy.instance_variable_set(:@scope, current_scoped_methods||{})
               class << proxy
                 def method_missing(method, *args)
                   scope_options = #{class_name}.read_inheritable_attribute("auto_scope_options")["#{scope_name}"].dup
                   #{class_name}.evaluate_auto_scope_values!(scope_options)
-                  #{class_name}.with_scope(scope_options) do
-                    #{class_name}.send(method, *args)
-                  end
+                 #{class_name}.with_scope(instance_variable_get(:@scope)) do
+                   #{class_name}.with_scope(scope_options) do
+                     #{class_name}.send(method, *args)
+                   end
+                 end
                 end
               end
             end
After that patch failed test passes
  1) Failure:
test_nested_has_many_scope(AutoScopeTest) [./test/auto_scope_test.rb:72]: