[CB-4543] Changed implementation of graftXML to create parent if its not present

cc @bryanhiggins @imhotep