cells: Fix retry loop and logging in sendAndWaitToPermanent

Signed-off-by: Gerd Behrmann
merge: trunk@18210