Allow get-index to handle bytestrings too.