fix issue with checking if there are orphan tables

Signed-off-by: Frédéric -lefred- Descamps <lefred@percona.com>