Nice clean code for GROOVY-6451 now that we have GROOVY-6561.