Handle edge case in scope.insertMath() rather than applyInlineMarkup()