Robert,

As I'm not using the MCP23016 I haven't read the entire datasheet.

But looking at your schematic there is one thing that may cause strange effects:

you have switches to VDD, but no PullDown Resistors.
So when the switches are open the MCP's inputs are floating.

(I would prefer to have the switches connected to GND and have PullUps to VDD)

I