Fix undefined type due to a circular dependency in class initialization