GROOVY-6522: Fix breaking change introduced by previous fix