Make sure indexes are updated when checking attribute usage