Fix purging categories, tags and the root

Tested with WP 4.0.