diff --git a/src/sap.ui.core/src/sap/ui/model/TreeBindingCompatibilityAdapter.js b/src/sap.ui.core/src/sap/ui/model/TreeBindingCompatibilityAdapter.js
index <HASH>..<HASH> 100644
--- a/src/sap.ui.core/src/sap/ui/model/TreeBindingCompatibilityAdapter.js
+++ b/src/sap.ui.core/src/sap/ui/model/TreeBindingCompatibilityAdapter.js
@@ -228,7 +228,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery"],
 					that.clearSelection();
 					var _aSelectedContexts = this._aSelectedContexts;
 					jQuery.each(this.aContexts, function(iIndex, oContext) {
-						if (((_aSelectedContexts ? this.aContexts.indexOf(oContext) : -1)) >= 0) {
+						if (((_aSelectedContexts ? _aSelectedContexts.indexOf(oContext) : -1)) >= 0) {
 							that.addSelectionInterval(iIndex, iIndex);
 						}
 					});
[FIX] TreeBindingCompatibilityAdapter: Safe Array indexOf

The indexOf call for restoring the selction was previously done
on the wrong array, which was not defined in this function's scope.

Change-Id: I4c<I>a7d5e<I>ed<I>adce5bb8e7f<I>e<I>
BCP: <I>