Added support for function-wide invariants.