fixing bug #3647
Preventing NullPointerException when first level value is removed
Merge branch 'core-5.11.x' into bug-3647
fixing bug #3647