Made clause handle explicit module modifier of head.
Also a couple of cleanups (since term_new_mod preserves arguments.)
Authored by: dwarren 2018-03-20
Parent: [r9241]
Child: [r9243]