Scripting: regression test for issue #1811.