fix hash() for AbstractArray. fixes #4860