(#2779) - fix undeletion with wrong rev

turned #2779 into an actual test