MDL-41068 profile: Repair profiling after box API change

The box API was used with an extra incorrect parameter
in the profiling code.  It worked without issue until
the introduction of error checking in MDL-40842.  It
has failed since then.
Merge branch 'MDL-41068' of https://github.com/mr-russ/moodle