Fix broken variables resolving in filters using workaround