backport-1.8-3952

Backport #3952: `BUG: #2052 del scalar subscript causes segfault`