Let's look at other parts of the decision, shall we?
"It will be borne in mind that this is not a question of the power to proclaim martial law, when war exists in a community and the courts and civil authorities are overthrown. Nor is it a question what rule a military commander, at the head of his army, can impose on states in rebellion to cripple their resources and quell the insurrection. The jurisdiction claimed is much more extensive. The necessities of the service, during the late Rebellion, required that the loyal states should be placed within the limits of certain military districts and commanders appointed in them; and, it is urged, that this, in a military sense, constituted them the theatre of military operations; and, as in this case, Indiana had been and was again threatened with invasion by the enemy, the occasion was furnished to establish martial law. The conclusion does not follow from the premises. If armies were collected in Indiana, they were to be employed in another locality, where the laws were obstructed and the national authority disputed. On her soil there was no hostile foot; if once invaded, that invasion was at an end, and with it all pretext for martial law. Martial law cannot arise from a threatened invasion. The necessity must be actual and present; the invasion real, such as effectually closes the courts and deposes the civil administration...It follows, from what has been said on this subject, that there are occasions when martial rule can be properly applied. If, in foreign invasion or civil war, the courts are actually closed, and it is impossible to administer criminal justice according to law, then, on the theatre of active military operations, where war really prevails, there is a necessity to furnish a substitute for the civil authority, thus overthrown, to preserve the safety of the army and society; and as no power is left but the military, it is allowed to govern by martial rule until the laws can have their free course. As necessity creates the rule, so it limits its duration; for, if this government is continued after the courts are reinstated, it is a gross usurpation of power. Martial rule can never exist where the courts are open, and in the proper and unobstructed exercise of their jurisdiction. It is also confined to the locality of actual war."
So it is not a question of who suspended habeas corpus but where and when.
Considering where and when it did occur, whether or not it was performed by Lincoln or the Congress, the court ruled it illegal.