Fix #1121
Add test for #1121
Merge pull request #1122 from ractivejs/gh-1121

Fix #1121