Avoided transactional truncates on amateur databases.

Fixed a test failure that appeared after 753a22a6, although the bug
existed before that commit.

Refs #22308.