If the tank crew shot first, the crew would not have been out of the tank on foot. But it is a rule of engagement that tanks do not fire in areas where civiliams (non-combatants) may be. Contrast this to terrorists who specifically target civilians.
U.S. sanctions Russia's state-owned arms exporter Rosoboronexport (Reuters)
from the article: IDF soldier killed by friendly fire on Gaza border