Fixed #15053 -- Improved template extending algorithm.