Fix some incorrectly generated code

refs #7699