Hmm, well.. It's obviously written to only try that if there is a (2) in bank; otherwise it'd deposit the (2) and withdraw a (4).
How do you know it's trying to find a (2) dose? What's it logging
also, don't happen to have a (2) dose placeholder or something like that, do you?