S.F. still restricted in sweeps of homeless encampments, court rules