in random mode I select only one class or favorites and I enter the match with heroes that are not of the class that I selected and heroes that I do not have.
I believe this bug triggers only when they activate an XP bonus for random selection. When the bonus is not active I think it properly restricts auto select to your chosen selection (favorites, class types).
same thing with me today, as favorites only and hero i got was not on favorites.