Here goes.
When you write SET "var" = 5 (or READ_LONG offset "var"), "%var%" (quotes excluded) is associated with 5. When WeiDU tries to convert "%var%" to an integer, it looks up the association for "%%var%%"; since none is found, then it looks up the association for "%var%".
READ_LONG associates "%#items%" with the number of items.
WHILE ("%#items%" > 0) operates on the value of "%#items%" ("%%#items%%" is not found)
SET "%#items%" -= 1 reads "%#items%" ("%%#items%%" is not found) and stores the result in "%%#items%%"
from now on, WHILE will read "%%#items%%"
Finally, the macro does its job and sets "%%#items%%" to 0 because it scanned all items (if an item is found, "%#items%" is set to zero, but the loop continues because the value is never read).
Next time the macro is launched,
READ_LONG will set "%#items%" to the number of items
However, WHILE will read "%%#items%%", which is still zero from before, meaning that the loop is not executed and the macro results in a do_nothing().