Simplify 'set' implementation.