The Dislike of Praying in the Aforementioned Mosques—even when one did not go there because of the grave.
As for the second situation, I do not find sufficient grounds to declare the prayer invalid; it is merely disliked. A verdict of invalidity in this case would require its own specific proof. The evidence by which we established invalidity in the first situation cannot be extended to this one, for the earlier ruling of invalidity was based on the prohibition of building a mosque over a grave—a prohibition that exists only when the building is intentionally erected for that purpose. Therefore, it is sound to say that intending to pray in such a mosque nullifies the prayer, whereas claiming that the prayer is void without any such intention rests on no particular prohibition and cannot be established by analogy, let alone by an a fortiori argument.
This, most likely, is why the majority held the ruling to be mere dislike rather than invalidity. I state this while acknowledging that the matter calls for further investigation and that the view of invalidity remains possible. Whoever has