I'm a bit embarrassed that it took me so long to figure this out given that I'm paid to write high performance network code.