ByPropertyIdArray: Improved remove mechanism and added test

Change-Id: Ib59fe8ef5829d5506e5808d1cea1541f64991f35