Coerce to trait type when setting properties.

This can slow down asSetProperty since the extra coercion is needed, but hopefully the verifier can eliminate some of this overhead.