Issue #3143605 by andypost, longwave, daffie: Remove unused and broken update_replace_permissions(), which always throws an exception