node: ensure that _attach() only gets called once