Bug 909129 - stop leaking imported scripts and don't import duplicates, r=jgriffin