Also fixes the types
Type-directed merging of Obj and LFObj using an extra "obj_logic" parameter