Remove duplicate code in protocol backends.