Test and fix for #1210. World's lowest hanging fruit.

Justs adds a test to the code provided in the #1210.