The proper ruling from the court would be not to rule on the issue of machine guns, and stick to the question before the court. Saying “but machine guns are OK for a federal ban” would be improper dicta.
That is not an issue in controversy in this case and so no Court has jurisdiction to rule on that issue.