This function would only call `IDP_FreePropertyContent` on the items it
is releasing from its buffer, when reducing the length of the array.
However, it needs to call `IDP_ClearProperty` instead, otherwise some
invalid 'dirty' data is kept in the released properties, e.g. the `len`
value for groups or arrays.
Not sure how this never bit us before, but the recent asserts added by
6cb2226f13 did trigger in that case, once the code was re-using these
released IDProps.
Pull Request: https://projects.blender.org/blender/blender/pulls/146326