Fixed bug in check whether function needs to be instrumented.