Remove custom attrs properly when setting to null

I don't think this particular codepath was exercised at all (because all the callers call deleteValueForProperty) but this fixes a bug here nonetheless.
Merge pull request #1190 from spicyj/custom-set-null

Remove custom attrs properly when setting to null