Fixed inifinite recursion in TestBrowser.submit

Fixes #1707