Only return cached class if it matches client_class. GitHub #406