Resolve issue with double inclusion of a module

See #812

The proposed fix is to check whether the class exists before trying to `include()` the file.