Don't add a hyperlink style to matches that don't produce a valid NSURL
Disable the lock screen again after the keyboard is hidden or the image picker is dismissed to work around an iOS 8 bug