Only support settable variables if the type is copy assignable

This fixes what would otherwise be a compilation error for non-copy assignable types since they cannot be set.