Issue #1583: Add a test.
Issue #1582: Add a test, which passes.
Issue #1578: Add a test
Fix #1578: It's not pretty but the information doesn't seem to be in the model so we have to figure out the produced bounds ourselves.