If you prefer a fix in CalculateCacheForUserRole it's OK with me, this is the migration that was failing for me.