While I was not able to reproduce the crash, there was division by zero
involved, leading to NANs which where passed to where_on_path() which in
turn asserted.
Another symptom of this issue was that even without the crash, the text
cursor would disappear when backspacing on the last character.
Now clamp the responsible value to stay above zero to avoid the NANs.