Hsearch 1442 - @IndexedEmbedded depth analysis is broken

My coworker Yoann Rodière worked on a test case and a fix for HSEARCH-1442. This PR is for branch 4.4 as it's the current stable branch but it should be mergeable in all supported branches.

Feedback welcome.