Add test code for #2043 .

http://melpon.org/wandbox/permlink/baB6sC91l2hWqIKu is the result before fix.
Before fix line 353's result was `nil`.