Bug fix for the paste crasher (both regular and from clipboard).

Hopefully a better fix for the paste and clipboard paste crashers. Also a bit of reformatting of the indentation inside one of the functions that did not have consistent indentation. LATER: figure out why the front-end is not disabling options like paste at start-up.
8 jobs for f-crasher-fix in 337 minutes and 43 seconds (queued for 12 seconds)