Merge "Fix crash when activity not attached after search index finishes." into oc-dev