[HttpFoundation][Session][NamespacedAttributeBag] Refactoring of resolveKey() method