Fix bug with losing LaTeX typesetting after backend restart
BUG: 394003 FIXED-IN: 18.12 (cherry picked from commit 3321535207ce936c5585b6d10b32db168c5cc51f)