This looks like the issue. @bayu you could define your own equality operator for juce::NormalisableRange<double> and that would probably work, something like:
Although in this particular case, using a range-based for loop over the elements and immediately grabbing the index using indexOf seems like a roundabout way of doing things. You could just use a classic for loop and avoid the indexOf lookup on each iteration:
for (auto index = 0; index < ranges.size(); ++index)
{
auto& range = ranges.getReference (index);
}