Knocking Sound from rear of car on 1996 Oldsmobile 88

I hear a knocking sound from the rear of my car. The sound is like a single muffled knock. It's like someone is inside the trunk and gives it a single knock with a rubber hammer or fist. You have to listen for it sometimes, but you can hear it.

The sound usually occurs when I first drive the car in the day, after I have parked the car for a while. It only happens one or twice usually within a few minutes after starting, and then I don't hear anything more. And it can happen either while driving or while idling at a stop.

I checked my trunk and there is nothing loose. I thought it might be the rear shocks or brakes, but I had these checked out

Someone told me that the sound could be coming from the gas tank, with the problem either being:

1). The gas tank is pressurizing from the fuel, or it might be running a leak check and pulls a vacuum. This could cause the gas tank metal to move in or out giving a dull thud sound.
2). The baffles inside the gas tank have come loose and this is causing the sound somehow. One symptom of this baffle problem is that you can hear the fuel sloshing around in the gas tank. And I do hear my gas sloshing around when I back up.

Any opinions? Is this something that I need to fix, or can I just leave it be?

My car has a 3.8L V-6 engine with automatic transmission.

Asked by for the 1996 Oldsmobile 88