Recommitting this patch, after testing it on a PLC node.