677a678,681
>             } else  {
>                 # the preferred item is not available
>                 # don't set the variable `item'
>                 set index pref_unavail
684,689c688,696
<         # do the actual allocation
<         set pool(freeitems) [lreplace $pool(freeitems) $index $index]
<         if { [string length $allocID] } {
<             set state($item) $allocID
<         } else  {
<             set state($item) dummyID
---
>         if { [string compare pref_unavail $index] } {
>             # do the actual allocation
>             set pool(freeitems) [lreplace $pool(freeitems) $index $index]
>             if { [string length $allocID] } {
>                 set state($item) $allocID
>             } else  {
>                 set state($item) dummyID
>             }
>             set allocated 1
691d697
<         set allocated 1
