Make `stub_const` and `hide_const` work for modules that define send

Closes #272.