More work on bug #8296.  It is now possible to create functions.