When fixing minor bug in function PickFlavor it turned out that logic inside is overcomplicated because it assumes that it picks flavor from the list of all available flavors, while it actually only picks optimal flavor from a list of all matching flavors. (By 'matching flavors' we denote all those flavors that apply to given disk and RAM criteria). Fixed - the function is now utterly simplified yet it still picks optimal flavor.
When fixing minor bug in function PickFlavor it turned out that logic inside is overcomplicated because it assumes that it picks flavor from the list of all available flavors, while it actually only picks optimal flavor from a list of all matching flavors. (By 'matching flavors' we denote all those flavors that apply to given disk and RAM criteria). Fixed - the function is now utterly simplified yet it still picks optimal flavor.