Fix a bug: when in a file several classes are defined, they weren't kept correctly