Religious liberty almost defeated