fix #4481: cache rendering leads to ANR

This fix is only partially correct, in that it will not recompute the
whole layout (including the position of line breaks) when images are
loaded.