Fix XMI serialization issues

Change-Id: Ie4ac9b80069a60615e7db234b8a0a4defb26154a
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>