Found a little inconsistency in window_find_by_id

Can someone check if I am right, I am not experiencing any problems but they may come up in the future.