Fix "::::" appearing in module_path!()

Closes #18859
Shouldn't the `mod_pop` underneath this also be conditional? (is this why the `unwrap` above was removed?)