Fix AddRangeToSortedSet for working in transactions