Fix bug with wrong baseline calculation in last paragraph (2nd attempt)

This time, we consider the cases where a \par is not wanted (single-par insets, tabular cells).

Fixes: #9231