Hey Mitchell,
Any special reason you're switching to Safari?
In order for AppleScript to work correctly with Safari's front window the app needs to be visible and not hidden. The “Show” action in the following macro unhides Safari if it is hidden – but does NOT activate it – and saves any need to switch to it.
Using System Events to fill the link dialog makes this pretty fast.
Apple Mail → Insert Safari URL from active tab.kmmacros (6.6 KB)
Much more efficient (if rather more arcane) is to create the RTF link directly on the clipboard:
Paste RTF Link on Clipboard from Safari Active Tab Title and URL.kmmacros (7.6 KB)
-Chris