Fix market

Fix bug introduced in 76c1ee86.
Probably also fix #462, simple trade with two offers works now.