Guard against trying to encode any shapes with 0 components