A bit more digging - changing the beforeEmit function as follows seems to help, as the correct socketid is there, so can be re-attached..
if (original) {
var om = original.msg;
om.socketid = original.socketid;
return om;
}