Fixes issue with requiring class twice

Ensures that if a class is required inline (not in the class
declaration) then callbacks are run on consecutive calls to require.