Upgrade to Groovy 2.2.0.

Had to change some error handling around for a reason I don't fully understand. It was a necessary change anyway.