Bug fix in heading wikitext escape handler

The bug is reproducible with the following test (requires selser runs on
manual edit changes in parserTests - T72722 to add it)

[subbu@earth tests] echo "=='''x'''=m='''y'''==" > /tmp/wt
[subbu@earth tests] node parse < /tmp/wt > /tmp/old.html
[subbu@earth tests] .. copy to new.html and delete the 2 bold nodes ...
[subbu@earth tests] node parse --html2wt < /tmp/new.html
==<nowiki>=m=</nowiki>==
[subbu@earth tests] node parse --selser --oldtextfile /tmp/wt --oldhtmlfile /tmp/old.html < /tmp/new.html
===m===

Change-Id: I136d03e7010e2cf91c7588bf8aa5cc775234a63c