I believe this is caused by summons from Arcanist/Summoner/Scholar which forces the mob to move for him or something. In this specific situation it was Ifrit Egi. The Ahriman just sits there invulnerable not moving and we can't fight the last boss because he won't open the door for us.