Fix bug #7970: space disappears from equation when reopening LyX file.
Fix bug #9319: Problems with space inside math and textrm.