Ah, yes, it's the pitfall we can't avoid, the situation where the predicate is always false and the provider knows that.
With a non-empty collection it will produce either an IN clause or a set of PK field value comparisons if the PK is a compound PK.
With an empty collection, there are no values to compare to, so it will result in an always false comparison. It tries to create such a thing by producing a 0=1 predicate. This apparently goes wrong in the case of Firebird. The thing is that the casts are removed because they're unnecessary (the type of the value is already int, unnecessary casts are removed, as casting an int to int is... redundant)
~~What I don't get is why Firebird doesn't know the type of the parameters, as it does know the type of the parameters, as that's set on the parameters. I know the @p1=@p2 construct is odd, but it's a valid construct.
... where field = @p1
works in firebird as well, why all of a sudden does it not know the parameter type?~~
Answered here: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=20953 which is a similar problem you brought up more than a year ago. Perhaps we can re-use that trick here again, we'll check.