Switched the named group selector to be lazy. Previously it was being greedy and consuming multiple arguments. This was corrupting the statements produced.