Vector: Rewrite search with nesting

Change-Id: Id375b0f2036ea0fdc010712e7721b57fc4ebfa8f