fix #662 dupe imports added when pasting code with import statements