It looks like you have narrowed down exactly where the problem is happening. I am afraid I don't know enough to help you solve it. Sorry.
Mathematics tools
STACK Moodle 3.2 Setup
This discussion has been locked so you can no longer reply to it.