Try moving the function handleResult inside the node.on("input") and don't save a reference to msg (it should be in scope due to being an embedded function).
This should also avoid concurrency issues.
Alternatively, try cloning the msg as you assign it to the node variable before the call to probe.