Avoid overriding user-defined handlers when reassigning attr handles. Fixes some failing tests.