Some trick:

If there are analog signals on inputs, they can drive the current through the inputs to an high level, if they are digital inputs !

So,
you can declare all the inputs as analog and switch them to digital in the case of reading a digital input and switch them back to analog after (ADCON1).

You can switch all the AN3... to digital and see what happens ;-)
You can read the analog value without problems!

You can arrange the analog inputs on the first AN-channels !!!!!!