Why try to iterate over `remote.itemsMap` when it's actually set to an empty object in line 529?