Fix for GRECLIPSE-1588

Also see GROOVY-6011