Fix tests on Windows

I've changed one of the tests due to the `|| pattern == last` addition.