Oops, this is my fault. Can you uncomment line 964 and do it != detectors.end() in the for condition?
(I could do it but this will save you a conflict.)