Chain index reuse in select query. Fixed bug isOneValueDetection.