Properly save state propagated flat functions.