Copy initial state when specializing functions.