The combination of full prisons and tight public finances has forced the government to urgently rethink its approach.