The error returns on line 22 of the attached file:
return new IntegerPairIterator(unionKeys.iterator())
Assigning to a temporary variable and returning on a second line OR removing @StaticCompile will fix the problem.
I thought this was related to
GROOVY-8590 because it first occurred in Groovy 2.5.0-rc-3, but it was not fixed in Groovy 2.5.0.