Move templight related clang argument logic to a new environment