Fix issue 13434: segfault on indexing array with empty tuple

Fixes: https://issues.dlang.org/show_bug.cgi?id=13434

Basically, the code failed to account for empty tuples being NULL, not just having `dim == 0`.