Thanks Mike for the fix you suggest. I've been working on this independently on your solution (I found it just before I was about to create new issue) and concluded a very similar solution.
In the patch I am going to submit for inclusion, I just fix the part of the problem that the page content is displayed using 'header' element. Instead, 'html' element will be used. But the page title will not be displayed to students (hence no need to change passing its value) as it seems to me that this is intentional feature. Like for Questions in the Question bank, the question / page title is meant as information for teachers while students see just the content. Those who want to have lesson pages with titles can insert them into the page content field.