XPS: don't rely on uninitialized variables (fixes issue 2578)