Fix bug in which data constructors were being incorrectly accessed across modules