Judge reverses ruling on part of South Carolina immigration law