Here it is a little bit easier to see that this is a side-effect of the method, but to be consistent I would recommend making the same kind of changes I suggested for `findCommonPrefix()`