Stop whitespace upgrade logic from creating empty text nodes