Temporarily disable idle over speed and under speed error (set all zeros), see what it does. That can wildly vary timing making idle tuning a hassle....
I would suspect a ground issue based on the fact that the engine was pulled, its pretty common a ground doesn't make it back to where it was supposed...