avoid a theoretical race from last commit

Not sure if this is possible in practice (the listening callback gets
invoked via nextTick, which is usually before the event loop).