Merge "Add a test to enforce unique id for preferences (in search)"