getFormat has the following code
it looks like that second `if(argumentNumber < 0 || argumentNumber >= subformatCount)` is just a typo
it should be
Part of ticket #8319 implementation.