Thanks mitsuhiko for the report. This commit just adds a test since the problem was fixed in 8aaca651.