The crux of the problem is that current US law mandates that all foreigners be granted the full protection of law while they are in US territory.
If, instead, we simply changed that so that US law protections only apply to US citizens, regardless of location... then foreign terrorists could be locked up indefinitely, or interrogated, without jeopardizing the Constitutional rights of US citizenry.
I agree that's the heart of the problem, and I agree with the solution as well, as long as it applies only to terror and terrorism . Then they can't do the thing they usually do and sell the new powers in the law as necessary for dealing with terrorists or child molesters, and proceed to use them on all suspects.