No, that gives the last word, as you say, we want the dirname of the last word.
$ echo foo/bar
foo/bar
$ echo !$ !$:h
foo/bar foo $ echo foo/bar
foo/bar
$ echo !$ !$:h
foo/bar fooIn comparison. !$:h understands its task at a higher level. And thanks to key rollover, typing different characters, like !$:h, is quicker than tapping away at . until visual feedback, which may lag, tells me I've done enough.