don't generate broken XML files, related #i116460#

Change-Id: I5d7f487b787295af6189425601c5d7e829a3db52