Fix crash while reentering the Functions dialog after it was previously closed