Note to self: when faced with an unknown system, such as replacing a bunch of electrical sockets and switches, including two 3-way switches, always understand the desired end, and read the instructions.

Repeat: read the instructions.

By evening, all the kitchen lights were working properly. At last. After about five hours quite a few frayed nerve endings.