I notice that the fix above has been incorporated into the code at some point between versions 2.2.14 and 2.2.17, although it's not mentioned in the CHANGES file. This issue could now be closed.