Edit: my answer below is probably not valid since you are using include_once
which I missed when I read the question.
I am guessing that this is unrelated to Sage but anyways: are you (or soberwp/controller) maybe calling do_pdf()
multiple times? If so, the error occurs on the second call to the function.
There are probably multiple solutions to this but the quickest and most dirty solution is probably to wrap the include call in a conditional check in which you use https://php.net/manual/en/function.class-exists.php or use