Fixed #13813 -- DatabaseWrapper comparison should not raise error