Allow to use the same class name for proxy models

Fixed #21338