Make search ids unique. Fix #464