More efficient DOM iteration
Changes for b2evolution 5.1