Check for invalid upsampling block sizes
Add test cases for invalid block sizes
Merge pull request #1299 from ahojnnes/block

Avoid using `block_reduce` for upsampling