You're right. I moved the `purityLevel` call at immediately before the check of `TypeFunction::purity` field.