On T176754 we discovered that user_rights table does not update itself when user rights expire and that when temporary user rights expire the user_former_groups ain't updated either until unless another rights change happen in that wiki.
This task aims to request a fix for this second part (user_former_groups not being updated when user rights expire) as suggested in the task linked above.