Fix text overflow issue in lot/lof entries with long titles

Same issue as #1359 but for lot/lof titles.