Fix indicator removal loop

Change to use more efficient loop structure.
Merge remote-tracking branch 'origin/master' into detatched-indicator