Add a test case for search with reference to array

This is a test case for 9d6be9fccf1c7283a3fcd6b735a9b100af705a12