make sure class file is loaded once

I have had tests (calender in stable7) which would fail because it is attempted to redeclare classes.

@georgehrke @DeepDiver1975 @MorrisJobke