Updated to search in requested headers last rather than first, as if they were system headers