6distributed: Improve prefix deprecation algorithm