Bugfix in LL1 optimization: all test cases pass.