Fix ObjectSchema to be able to find classes defined inside an object