Fix bug in compileAttributes when generating fns taking no args