Allow functions to be written to (bug #2278, with mods)