Adds some Asserts in the renderer

Linux still has a bug, but I can't reproduce it all the time.
Hoping that these asserts will help me find it