Loot All function no longer working

I had this issue and do not use mods, so I think they may be unrelated.
Changing keybindings, saving and then resetting them did not help.
(This action actually wiped out most of my input.ini file’s contents, luckily I had saved a backup.)

But I did find one sort-of-solution.

Changing the keybinding to anything other than F using the ini file fixed it. I could use the new binding just fine. But if I changed it back to F, it stopped working. I explain it here:

I changed the binding to O and that let me loot corpses. I clicked to reset bindings to default and could not loot the corpse with F.