Effect of a magnetic order on the phase stability of the parent chalcogenide compound FeSe