Make sure related object cache takes into account model inheritance.