Extra "where" clause does not get appened to Select statement

Here’s an example of the debugger not working properly. 2 days I’ve spent on this problem!