crypto: fix moving read head

Fix various possible stalls of read head. I.e. try moving it after every
write head update.

NOTE: This is actually backported from `bud`.

/cc @bnoordhuis