fixing UserContextInheritanceMgr and updating the UserCtxInheritanceTest
(#1999)