filter out duplicate parameter replacements (fixes #32)