tests for constrained indexing