Fix crash for indexes involig expressions