Fix #389.
Fix #388.
Fix #244.
Fix #387.
Fix footnote regression.
Update for MDL-48206.
Refix #244.
Merge remote-tracking branch 'upstream/master'