Simplify the subprotocol selection code.