Add some regression tests to track down confusing result