I can't understand the problem. You say there are no rows where IsResSchedule = 1 , but the code for the new sample data shows 2 rows with IsResSchedule = 1.
Could you explain some more or give sample data with the expected results for that particular case just as you did on your original post?