Use this.index for checking collection, and test for resource not in collection.