Borrow checking for overloaded indexing

Closes #15525