Use a MethodInfo constructor to assist with caching ACCESS_FLAG lookups.

This seems like something that could benefit from optimization, given that it loops over all attributes just to find one, and it doesn't even break out of the loop after finding that one. But you're just copying over existing code, so let's leave it this way for now and do that optimization in a separate branch.