Fixed #21118 -- Isolated a test that uses the database.

Thanks rmboggs for the report.