Fix crash when a `slice` object is called (#10715)


Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
3 files changed