Fixed #23862 -- Made ManyToManyRel.get_related_field() respect to_field.