title: Boolean method in groovy always returns true
body: <p>This code is a little bit stupid but it represents the problem fully.
  The two maps are different but true is allways returned. Why is this happening?</p>
  
  <pre><code>class SampleTest {
  
      private static boolean compare() {
          def a = [a:'one',b:'two']
          def b = [c:'three',d:'four']
  
          if(a.size()!=b.size()) {
              return false
          }
          a.each {
              if(!a.equals(b)){
                  return false
              }
          }
          return true
      }
      static main(args) {
          println SampleTest.compare()
      }
  
  }
  </code></pre>
  
  <p>If I add additional variable then all works fine:</p>
  
  <pre><code>class SampleTest {
  
      private static boolean compareArtifact() {
          boolean areEqual = true
          def a = [a:'one',b:'two']
          def b = [c:'three',d:'four']
  
          if(a.size()!=b.size()) {
              return false
          }
          a.each {
              if(!a.equals(b)){
                  areEqual = false
              }
          }
          areEqual
      }
      static main(args) {
          println SampleTest.compareArtifact()
      }
  
  }
  </code></pre>