Fix bug #12138 with indexing "closures".