Not sure as I can't verify on the tablet I'm currently using: shouldn't the removeParamsFronPL function adapt the featureidscount variable to 0  so that the code below efdectively removes the listener for the remove event?

In general, those 2 parts should work together.