ast: More robust determination of the bounds of Prisms