scripts: make sure target is not nil when iterating filters with matching targets
This avoids the following Lua error if we have 2 smart filters, one with a smart target and the other without a smart target:
wplua ../modules/module-lua-scripting/wplua/wplua.c:51:_wplua_errhandler: [string "filter-utils.lua"]:427: attempt to index a nil value (field 'target')