GROOVY-3971: adding method to class in ASTBuilder not working

For review only - don't commit pending further discussion