The Supreme Court said "the 2nd Amendment guarantees an individual right to possess firearms independent of service in a state militia and to use firearms for traditionally lawful purposes, including self-defense within the home." Antonin Scalia.

The 7th Circuit Court is ruling that self defense is the only legitimate use of a firearm. They rule that the AR-15 is not a good choice for self defense.
There's many problems with this.
1. the Supreme Court didn't say self defense is the only justifiable use of a firearm. The AR-15 is commonly used for target shooting not to mention hunting.
2. The government presented experts that said handguns are better for home defense than an AR. That's no reason to outlaw anything other than what the government says is the best option.

The 7th Circuit Court also says military grade firearms are not protected. Yet the "text, history and tradition" the US has never outlawed firearms just because they are used by the military. Quite the contrary, there is a history of military surplus firearms being sold ever since the beginning of the US as a country. We've always been able to buy military firearms chambered in .30-06 and .45-75, which are much more powerful than the 5.56 that the AR platform usually shoots.