Fix more bugs with Policy JSON to/from XML