Ensure idempotency of EAG import and remove some really weird (test?) code that screwed it up