Make entityselector work with deleted entities

Change-Id: I101d2c4706218384e3755cd8a61aaa6a0ee16a1c
Merge "Make entityselector work with deleted entities"