Fix localid()

If you let `locked` generate an id for you, you currently get an undefined result from `Node.prototype.localid`.