Fixed condition of nested templates