Fix self referencing functions.