Add a `checkArgument(parts.size() > 0)` to make sure this will never fail in an unexpected way?