Fix issue 9960 Show warnings/deprecations during template instantiation