An inmate who murders a guard can get no more than 5 years in solitary confinement, but being found to be associated with a gang—even if you haven't done anything illegal—can land you in isolation for decades.