A different fix for handler exclusivity problems

The earlier commits are various cleanups; the money's in the most recent two.