[fix] Use a closure to preserve the plugins functionality
[fix] Use a closure to preserve the plugins functionality

See #349 and 483d44bcdd.

primus/primus,STRML/primus,basarat/primus,dercodebearer/primus,colinbate/primus,modulexcite/primus,basarat/primus,beni55/primus,primus/primus,beni55/primus,colinbate/primus,STRML/primus,basarat/primus,dercodebearer/primus,beni55/primus,modulexcite/primus,colinbate/primus,STRML/primus,clanwqq/primus,dercodebearer/primus,clanwqq/primus,clanwqq/primus,modulexcite/primus,primus/primus