Why would two different functions which return exactly the same value cause different results?

The first thing that comes to my mind is that you are accessing resources that reside on the render thread form the game thread, can you please share a bit more about the role of those matrices?