referenced by boxes. This is done by creating a shim function that handles the cleanup of the box properly. Closes #10672.