What you are trying to do in the query seems pointless. You are trying to limit the results of a query using the state of a parameter. But you do not compare this parameter with anything in your choice.
Think about this query (this doesn't make sense):
SELECT * FROM SOMETABLE WHERE :list IS EMPTY
, , , : :
:list : ...WHERE x.id IN :list
:list : (NO WHERE CLAUSE AT ALL)