Generate DOM refs dynamically, rather than during macro expansion.

David was using letdom in a loop ...