fix Issue 7511 - attribute inference does not work for methods of templated aggregates