Inspekt fixes

A bunch of fixes that I found while testing the program `inspektor`.

Please review with care, I have basically no familiarity with the `arc` code. I just made changes that seemed reasonable, but I might be way off in some of them.