Looks like your pipeline test pressure and/or the design pressure is/are in error.
First, FIVE things you didn't say,
1) What pipeline design code is this?
2) What is the pipeline design pressure?
3) What wall thickness are the flanges
4) What is the design factor of the flange?
5) What is the diameter of the flange neck?
MSS SP-44 (1996 edition referenced by CFRs) allows the use of A694
True that MSS SP-44 states in Table 3 that the 900# limit is
2220 psig (153 barg) from -20[°]F up to 250[°]F
(BTW that is [highlight #CC0000]121.11[°]C[/highlight])
But also true that the 2220 psig (153 barg) 900# rating is true for all materials, of lesser and greater yield strength, than A694-Y60 900# Class. A105 is a lesser yield material, but a MSS SP-44 flange made of A105 is still rated to 2220 psig (153 Barg).
An A105 flange, being of lower yield stress, would obviously be furnished to a thicker wall to meet that same 2220 psig than would be the a Y-60 flange.
When you get down to it, from the admittedly little I know about this problem right now, it appears that it was a mistake for the pipeline designers to do what I think they did by selecting a design pressure of 161 barg, slightly above the 153 barg (2220 psig), 900# flange rating, hence requiring the excessive test pressure (1.5 * 161 barg = 241 barg) as well. Didn't they know that they would create this problem by selecting a design pressure greater than the flange class 900# limit? Maybe that was the problem.
The design pressure needs to be reduced to 153 barg, or you have to cut out the flanges and replace them with the 2500#, or you have to go to what may be 105% yield stress on the flanges, if you can find them in your required diameter. Usually testing to no more than 2% over yield is an absolute maximum.
Answering the Five questions that I have asked above, might lend some valuable information towards suggesting some other solutions to this problem, but I am not hopeful.