fixed incorrect processing of empty XML tags; closes #1625