title: Closure not valid with Grails 2.5
body: <p>I had the following code working with grails 2.3, but a strange behavior is happening with grails 2.5, and closure content is not parsed (no error in console still). In example below, the println for debug purpose is not displayed, in spite the correct form filled.</p>
  
  <pre><code>def send = { DemoForm demoForm -&gt;
          if (jcaptchaService.validateResponse("image", session.id, params.captchaResponse)) {
              if (demoForm.hasErrors()) {
                  render(view: "display", model: [demoForm: demoForm])
              } else {
                  println "------------------------****"
                  sesMail {
                      to "xxx"
                      subject "subject"
                      html g.render(template: "emailBody", model: [demoForm: demoForm])
                  }
                  render(view: "thankYou", model: [demoForm: demoForm])
                  return [demoForm: demoForm]
              }
          } else {
              flash.message = 'default.message.captcha'
              render(view: "display", model: [demoForm: demoForm])
          }
      }
  }
  
  class DemoForm {
      String firstname
      String name
      String company
      String phone
      String email
      String message
  
      static constraints = {
          company(null:false,blank: true)
          firstname(null:false,blank: false)
          name(null:false,blank: false)
          phone(null:true,blank: false)
          email(null:false,blank: false, email: true)
      }
  }
  </code></pre>