In Law, we have a doctrine called "judicial restraint," which means a variety of things, but essentially compels courts to do the minimum to decide the case and not issue activist statements that reach beyond the case and result in de facto legislating from the bench.
In Heller, we saw all sorts of nasty dictum, the judges claiming that their opinion did not extend to thus and so for. Look for more nasty dictum in McDonald, where the court will strike down Chicago's law while simultaneously trying to confine the right in an extra-judicial legislative blitz.