[1.7.x] Fixed #23880 -- Added missing index_together handling for SQLite

Backport of d2202ec2d4d0477b682c6d0051f27ab4843ef89f from master