First AnalogIn read in a sequence of reads gives the wrong value

I’m using the B-L475E-IOT01A and have the following code:

hall_a3 = new AnalogIn(A3);
hall_a4 = new AnalogIn(A4);
hall_a5 = new AnalogIn(A5);

while(true) {
    printf("Hall A3: %f\n", hall_a3->read());
    printf("Hall A4: %f\n", hall_a4->read());
    printf("Hall A5: %f\n", hall_a5->read());

I’ve attached all of the analog pins to ground, so I should get all 0.000000 values. Unfortunately I get the following output:

Hall A3: 0.294261
Hall A4: 0.000000
Hall A5: 0.000000

I assumed there would be an issue with the ADC. To test this, I added the A2 channel into the while loop, so that now 4 analog channels would be sampled in a row. I got the following result:

Hall A2: 0.301581
Hall A3: 0.000000
Hall A4: 0.000000
Hall A5: 0.000000

There is no issue when pulling the AnalogIn pins high. When I connect them all to AVcc, I get the following, as expected:

Hall A2: 1.000000
Hall A3: 1.000000
Hall A4: 1.000000
Hall A5: 1.000000

So now I have no idea what the issue might be. Any ideas on how I can solve this? I’ve confirmed that when I actually plug in my sensor that the first channel in the sequence does see expected changes. For example, when I plug in a Hall-Effect sensor, I see the values go up and down for all of the channels in the presence of a magnetic field. However, the first channel never goes below a certain value.

I updated to MBED OS 5.15 and that seems to have fixed the problem