Refactor Function::is_test_utility to examine its attributes instead of mutable state for the "test utility" flag.
#4006
+22
−11