fix use-before-definition bug in HtDP language implementation

Closes PR 14447