Subject Cannot insert new records after changing the where clause

Working with IBO 5.2 and Firebird 2.52, I am facing a weird problem.

I have a very simple TIB_Query w/o any foreign keys, lookups or such, after starting the application I can insert into the table w/o a problem.

Now, as soon as I modifiy the query by adding a where clause, the insert does not work anymore, giving a primary key error upon posting the new entry.

Even when I revert back to the original query, the problem remains the same.

Using the monitor to look at the statement sent to the server, I can see that all the fields are NULL instead of the new values, except the ID field, this is 0, although I can see in the connected data field that a new primary key was received from the server.

What can possibly break the query when only changing its where clause?