Move directive out of globals Upstream-commit: ffd96a7c733983a14edbb72b8a8685b7fb0102b6 Component: engine