I would add an assert here that hasOwnProperty() matches 'in' to be safe.