For a wikitext like:
'<noinclude><pagequality level="1" user="Mpaa" /></noinclude>Some text<noinclude>Footer text with final div</div></noinclude>'
the </div> tag is wrongly considered as part of the closing mark-up of the footer, instead of part of the footer text.
I.e., page.footer should be:
Footer text with final div</div>
and not only:
Footer text with final div