Switch to indexing for immutable vectors.