Don't loop infinitely on 0-size structs in repr

Closes #7625