EAGLESIX-2892 changed loop type, clarified var names, added dassert