updateAttribute should behave like updateAttributes

The current implementation of updateAttribute will overwrite any getter/setter methods that are in place. This pull request fixes that behaviour, as well as centralising the "set attribute" behaviour.