Fix simplify crash on empty input. Fixes #99.