Added to the list of unexpected difficulties.
The B-17 was supposed to complete its mission, refuel at what is now the capital of Papua New Guinea (Port Moresby), and then fly back to the Allied base in Australia, where it had taken off. The encounter with the enemy planes caused them to spend far more extended time in the air than initially planned. They got lucky and made it out of that encounter alive, but as they raced towards Port Moresby, they saw they wouldn't make it.