Issue #3275585 by dspachos, apaderno, joachim: Implementations of getInstance() return the wrong type (cherry picked from commit d9b8a31b)