Workaround for #3376 - error handling in build_plugin_tree added

Added a workaround for #3376 to the build_plugin_tree function. If the tree is corrupted the parent will be searched in the current plugin_list and no error is thrown. Instead a signal is send which could be connected to a task that fixes the tree or send a mail to an admin e.g.