Here is the procedure to reproduce the problem:
1. Discover some nodes through Discoverd/Capsd.
2. Then delete some nodes.
3. After a little while add the nodes you've deleted from step 3 again.
4. At this time you should be able to see only the new nodes in the WebUI.
5. Execute a query to retrieve the node for a specific label, something like: /opennms/rest/nodes?label=myrouter.local
6. You'll obtain two nodes: the correct one plus the old one marked as deleted.
If the WebUI is not showing the deleted nodes, I guess that the REST API should respect the same rules.