Fix maximum level check in PathLikeSelector.select.