Require that slice dimensions match array dimensions.  Fixes #4336.
Merge pull request #4337 from JuliaLang/kms/fix_slice

Require that slice dimensions match array dimensions.  Fixes #4336.