Daniel, thanks very much for your contribution to Ubuntu.
I am unable to reproduce this bug because for some reason vm-builder just hangs for me on both Lucid and Precise. However, from visual inspection, I think your patch is spot on. Note however that it does not apply cleanly to Precise.
See lp:~barry/ubuntu/precise/vm-builder/bug-612082 for a branch that resolves the conflicts, and which I propose to upload to Precise. Once the patch lands there, we can prepare an SRU for Lucid, and I am happy to help with that if you'd like. I will also link a bug task with upstream so that they can apply the fix there too.