Too much recursion error after opening a screen

This error happens sometimes after opening a screen. The problem is probably related to input focus.