Follow up for #3724 - fix out of tree builds.

(cherry picked from commit 10269696bfbbc451be6f6585cde47efe2696a83f)
36 files changed