[bug 907933] Do not query twice for public profile IDs.