runtime: finding last portal in corridor given target position.