Fix bug with contextual parameters in groovy templates