keep stack with nlocals instead of nregs; fix #1706
add a regression test for #1706
Merge pull request #1707 from Fleurer/issue1706

keep stack with nlocals instead of nregs; fix #1706