Sorry for the number of comments but I wanted to give credit to my colleague Sam Owre for fixing this bug and writing the submitted code.
Sorry for the number of comments but I wanted to give credit to my colleague Sam Owre for fixing this bug and writing the submitted code.