manual cherry pick of
https://github.com/liquibase/liquibase/commit/71f6121a96f0f8b389066c362512bfa677df3ce3#diff-cb56b94fa786ebc05382b54460d54147L793