Please disconnect the Chromecast and see if CEC behaves normally without it (leave CEC on in Kodi).
Do you have problems when turning of TV and AVR? Like stuff turning on randomly?
I had my Chromecast and RPi2 connected to my AVR for 6 month or so and suddenly Kodi switches back to his HDMI port etc. weird stuff. It stops when I disconnect the Chromecast. Your problem might be related.