Fixes #4086: Correct node role on deleted and pending nodes

http://www.rudder-project.org/redmine/issues/4086