Fix K+R reverse optimization bug
Merge branch 'master' into experimental