SegmentsBySourceJS: fixed handling of numerical indexes passed as string