Fixed a bug that can hang the game

One way this bug can be triggered is by colliding with a wall while strafing.
After collision, beta can become a multiple of u and thus h = 1 if dir > 0.
Therefore the index returned by PM_BisectVCT becomes the last index in VCT
hence causing trouble.