Cleaned up loops so it only falls back to the ugly complicated version when you actually have some sort of lambda inside.  Otherwise it's not necessary.