CREATE TABLE myproblems AS
SELECT
 gid,
 ST_Mem_Size(geom)  s,
 geom               geom_a,
 ST_MakeValid(geom) geom_b
FROM
 myoriginaltable
WHERE
 NOT ST_IsValid(geom)
ORDER BY s;

CREATE OR REPLACE FUNCTION mybbox(geometry) RETURNS Box2D AS
$BODY$
SELECT Box2D(ST_Union(t1.geom)) FROM (SELECT (ST_DumpPoints($1)).geom AS geom) AS t1;
$BODY$
  LANGUAGE sql;

--this is the table that is attached:
CREATE TABLE myproblems2 AS
SELECT
 gid,
 s                  original_geometry_size,
 ST_IsValid(geom_b) made_valid_is_valid,
 ST_Contains(Box2D(geom_a),Box2D(geom_b)) wrong_box2d_calculation,
 Box2D(geom_a)      box2d_original,
 Box2D(geom_b)      box2d_made_valid,
 mybbox(geom_a)     correct_box2d_original,
 mybbox(geom_b)     correct_box2d_made_valid,
 geom_a             geom_original,
 geom_b             geom_made_valid
FROM
 myproblems
WHERE
 NOT ST_Contains(mybbox(geom_a),mybbox(geom_b));