Fix a compilation-breaking typo in the previous commit.
Simplify and future-proof encode_conduct.