Additional 0-size checking

Fixes #10939