Be careful of using getColumns().size() in the case of expression indexes.
Please check all the existing code in this module for such uses.
Please add test cases that index an expression of 2 columns like (A+B) and two expressions of the same column like (A/2, ABS(A)).