Fix crash reported by Scott on the list. The test on latexname() was
obviously wrong. We want to know if we are in the same layout, and
that is not enough.
Fix tests which were forgotten in c7cdac6561.
Fix state of certain language packages (polyglossia, japanese) in children (#8779)
Merge branch 'master' of git://git.lyx.org/lyx

# By Georg Baum (1) and others
# Via Juergen Spitzmueller
* 'master' of git://git.lyx.org/lyx:
  Fix state of certain language packages (polyglossia, japanese) in children (#8779)
  Fix tests which were forgotten in c7cdac6561.
  Fix crash reported by Scott on the list. The test on latexname() was obviously wrong. We want to know if we are in the same layout, and that is not enough.