Removing non existent items from params to avoid bug when clicking on remove multiple times or when clicking on multiple remove buttons

Fixes #5304
Closes #5305