Back in the 1990's I was asked to write an arrangement of the hymn "Come, Thou Fount of Every Blessing" for choir SATB and piano. Since then, every time I've revisited it, I've rewritten it.
Most recently I was looking at a perpetually troublesome section and trying to improve it. In the process I discovered some undesirable parallel perfect intervals. If I tried to eliminate parallel perfect 5ths, I ended up with parallel perfect octaves nearby.