Assign non-zero width/height to all rectangles (issue 4260)

Fixes #4260.