Fix db.when() for a single flavor