Move search for header in umbrella directories into its own function

No functional change intended.