Fix issues related to layout of inline images.