Received "Pitched Battle" achievement when losing the game

The text for this achievement reads: Successfully defend Cuzco without constructing any new walls or gates in the second Pachacuti mission “The Field of Blood”.

At the very start of the game, I deleted all my units. (I thought deleting all my units would complete the first objective of this map.) After deleting all my units, I lost the game and I still got the achievement.