Fix child model attachment when exporting to java.