Declaring $pluginlist as static will cache the
database query results and always return the same
list of plugins - no matter which type is queried
(sidebar or event).
This cache must be busted if another type of
plugins is queried.
Backported from master.
Signed-off-by: Thomas Hochstein <thh@inter.net>