If you [alt]-add a unit to the queue while the factory is in wait mode, it'll place an icon of the chosen unit at the start of the queue with the same progress as the "currently building unit".
Once the factory gets un-waited, the factory will finish the unit it was currently building (while showing that it is finishing the alt-chosen unit), then return to it's regular production queue. So, you just end up with 1 extra unit of the kind that was currently in progress while the chosen unit was [alt]-added.
This only affects the first alt-chosen unit if multiple units are alt-added while the factory is in wait-mode: The game works as expected after the first one.