Put some resillience into the quote insertion code, so that it tries to find
the next available id if there is a race condition. Obviously this will fail
miserably if the site is really busy. :(