dead if statement elimination

See issue #95 for details.