Fix #16219: TemplateHaskell causes indefinite package build error