Fix a bug in preOptimizeStLoc