This is illegal HQL and it only worked before because we didn’t properly validate the query. You will have to create a join for your variable attribute:
from Object o join o.variable v where v IN (:parameter)