Fix length()/bytes() mismatch on XML string.