fix Issue 9309 - Regression (2.061): -O -release generates wrong code

In current, all nested functions should be weak purity at most.