The first step on the stairs gives an illegal position on the stairs
The easiest and straightforward fix is to correct the first step on the stairs. This can be done by projecting the first illegal position onto the first or last tread (depending on where the pedestrian entered the stairs).