Work around Groovy bug with reflection on IBM JDK.

http://jira.codehaus.org/browse/GROOVY-7010

+review REVIEW-5034