Fixed compilation of yield by setting the correct flag in the code object, added yield test case