Couple of robustness fixes on outbound JSON-RPC handling.