Fix bug with getOuterText() which was introduced during refactoring.