Only check for line dash pattern when annotation has a visible border (bug 957034 followup)

This fixes a *very* minor oversight on my part in PR #4080.
We only need to check for the existence of an invalid line dash pattern if there is an actual border width specified, since otherwise there is really no point in doing all of these checks.

Sorry about not catching this initially!