fixes issue #31: properly handle transition from scalar to array range