Releasing render texture that is set as Camera.targetTexture?

Why do I get this error in my build logs and not in the editor?
And why does it break my game? UI not appearing etc…
Its the last message in my build log, cant get any futher.

Updated to Unity 2017.1. Problem solved.