fixing and implementing test for #3782 (Security Context is not updated after editin...