Fixed Fix #dup modifying the original object (@mshibuya 37f36f7, #2687) Fix wrongly removing files on transaction rollback (@mshibuya, @rajyan eb03fe1, #2686, #2685)