Cleanup: Correct long-standing bug in endian swapper