I'm not sure I fully understand the issue that this change is fixing. There are actually tests for this function in `tests/utility-tests.js`, so can you add a test there showing the case that previously didn't work correctly and proving that it now works correctly with your fix?