Juggling patches to remove the need for one patch, and ensure that both xml files are writeable.