Don't redefine constants if they're already defined

Closes #233.