Fixed small issue when upgrading plugins

This doesn't really deserve a changelog entry. The bug was happening when
upgrading from a X.Y.Z-betaN plugin a subsequent RC.