Fix index tag mode in XML getentities output

Change-Id: I0614d0454d885f396c66211f968325ceafbe37ff
(cherry picked from commit 88687f2e3e82e6dbee58a0903ffbefdd26825984)