Applying Noel's patch for template specialization.