Fix deadlock in ps exited filter

Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>