Revert "Simpler fix for previous commit"
It has issue because of the removal of the compiledMethod

This reverts commit 04637ce678ce3fc3c2363e97a167fec65c1130c6.