Solve equations involving indices (#324)