Rejigged resolves to fix a mysterious Ivy problem on Mac OS
Merge OSX fixes into searching branch.