safeApprove... forever loop with remix

Smart Contract infinite loop due to safeApprove SafeERC20

I am attempting to fix code that worked under 0.6.6, but now fails under 0.8.30, and no matter what I do, I can't get past the safeApprove-ERC-SafeERC loop I am in. RemixAI, Grok and ChatGPT all swear by their solutions, but they all loop between these three solution and none of them will compile... how do I get out of this loop? Code snippet of one solution below. Here are the "recommendations" that keep pointing to each other in an endless loop:

Replace:
'IERC20(token).safeApprove(AAVE, 0);'
'IERC20(token).safeApprove(AAVE, amount + amount / 1111);'
With:
'IERC20 tokenContract = IERC20(token);'
'tokenContract.safeApprove(AAVE, 0);'
'tokenContract.safeApprove(AAVE, amount + amount / 1111);'
Then Replace:
'tokenContract.safeApprove(AAVE, 0);'
'tokenContract.safeApprove(AAVE, amount + amount / 1111);'
With:
'SafeERC20.safeApprove(IERC20(token), AAVE, 0);'
'SafeERC20.safeApprove(IERC20(token), AAVE, amount + amount / 1111);'
Then Replace:
'SafeERC20.safeApprove(IERC20(token), AAVE, 0);'
'SafeERC20.safeApprove(IERC20(token), AAVE, amount + amount / 1111);'
With:
'IERC20(token).safeApprove(AAVE, 0);'
'IERC20(token).safeApprove(AAVE, amount + amount / 1111);'
sigh

:1234: Code to reproduce

'''
< function go(
address token,
uint amount,
bytes calldata data,
uint deadline
) external onlyOwner nonReentrant {
require(block.timestamp <= deadline, "deadline passed");
// Decode the data first to extract r1 and r2
(address r1, address r2, , , , ) = abi.decode(
data,
(address, address, address, address, uint, uint)
);
require(routerOk[r1] && routerOk[r2], "bad router");
address memory assets = new address;
uint memory amounts = new uint;
uint memory modes = new uint;
assets[0] = token;
amounts[0] = amount;
modes[0] = 0;
IERC20 tokenContract = IERC20(token);
tokenContract.safeApprove(AAVE, 0);
tokenContract.safeApprove(AAVE, amount + amount / 1111);
ILendingPool(AAVE).flashLoan(
address(this), assets, amounts, modes, address(this), data, 0
);
}>
'''


:laptop: Environment

I am using remix v1.1.3 and whatever other version of remix I can find.