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

Closes #18859
Yes, that's why the `unwrap` was removed. I suppose they could both be conditional. I was thinking a pop function returning an option (and letting the caller deal with it) instead of unwrapping it made some sense, but now I realize that `mod_pop` doesn't return anything. This function is the only place `mod_push` and `mod_pop` are used, so it's not breaking any code elsewhere. Still, I can make the change for the sake of it making more sense at a glance.