Animal Companions and Legend

Does anyone know if you go legend and take two classes with Animal Companion abilities if the animal companion can go past level 20 when you become a legend? So, for example, if you were Ranger 20/Druid 20, would the AC be 20, 36 (if you don’t take the catch up feat for ranger), or 40?

I answered my own question by using Inevitable Excess. Animal Companions do not gain extra levels after 20. The PC can be 40 with 40 levels of pet capability, but the pet will just be level 20.