Fix creating triggers with the same pattern, wf and wf-input

Closes-bug: #1383146

Change-Id: I1885f329f25e1424ed2b76325e007d7b5a028e93
Merge "Fix creating triggers with the same pattern, wf and wf-input"