Bug 828298 - Fixig a problem in the algorithm closing a tag in mindgap.js