Core: invalidate plugin cache on plugin init failure.

Refs #1084.