Fix segfault caused by indexing array with empty tuple.
Add test cases.
Merge pull request #3969 from quickfur/ice_emptytuple

Fix issue 13434: segfault on indexing array with empty tuple