backport-1.7-3952

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