Fix for GRECLIPSE-1551 and GROOVY-6015