Fix potential panic during plugin set. Upstream-commit: f943df7d4824424bd648d7a165e89be8a65a952e Component: engine