Fix merge failure handling in tg export