Fix remote failure transfer + add tests for it.