Fixup Pull 3501 - Default trust implies @system, and typeof(func) should
extract proper function attributes.