Closing a dead-end branch