Make BaseObject.attributes a read-only property.