patching groovy variable error