Closes #784 w/test case and regen'd grammar from @zhaihj's changes. Thanks!