Allow for a chain of nested templates when searching for a terrain type.