It is slighly tricker than that, and the behaviour changed with PHP 7.4, it seems.
In some code, if someting tries to access $cm->uservisible, then that will indeed call __get.
However, for the cm_info class, __get does a bunch of complicated stuff, if any of the code called directly or indirectly by __get ends up making another attempt to access $cm->uservisible, then that will lead to the error reported here.
If you turn on developer debugging, then you can work out if that is what is happening from the stack trace of the error.