Fixed planning bug: generate the right combinations of  indexes of conditions for calling pattern matching to find variables candididates