Solving issue with default template selection causing infinite loop.