Fixes #1022: IPOPT segfault for trivial problem