Add a unit test to catch #180 (prior to fixing it, verify fails)
Fix #180