This issue arose from the work done in
A secondary node that is initial syncing from another secondary node with an in-progress index build, will not build the in-progress index build during the initial sync phase. It will only build the finished indexes from the secondary node that it is initial syncing from.
The work for this ticket is to write a test to showcase the correct behaviour. We will need to revert the work done in
SERVER-25175 to make the test work.