Added if condition to return node object from memory

Modified logic to return current node that has updated attributes from memory in case node running chef-client is also a node returned by search.