First of all, please check if the downgraded enemy Clan HQ matched the level, specified in your upgrade requirements. These requirements can be found in your Clan HQ window.
Also, please, make sure that when the battle at a rival HQ took place, your own HQ was on the appropriate level.
Like in every other mission or event, it is necessary to have the upgrade requirements present on the list, to be able to fulfill them.
Whenever your Clan HQ level changes, the old requirements disappear, since they are substituted with the new ones. If the downgrade requirement was not fulfilled, then it is most likely that you did not have it in your HQ, when the battle took place.
In other words, when you downgrade an enemy Clan HQ to fulfill the level 9 upgrade requirements, your own HQ should necessarily be on level 8 at the time of the downgrade.
Nevertheless, you only need to complete the HQ downgrade requirement once on each level. Therefore, if your HQ was downgraded, you will not have to downgrade a rival Clan HQ again to bring your HQ back to it's previous level.