That article says "There was less than 14 feet (4.3 m) separation between the bottom of the Air Canada aircraft and the tail of the Airbus A340." That's still far too close, but it's more than five feet.
> AC759 reached a minimum altitude of 59 feet (18 m) above ground level, comparable to the 55 ft 10 in (17.02 m) tail height of a Boeing 787-9, two of which were on Taxiway C
I think what happened is that it reached that minimum, but not while directly above the tail of a 787. By the time it was directly above one of the 787s, it had gained another 9 feet.
> AC759 reached a minimum altitude of 59 feet (18 m) above ground level, comparable to the 55 ft 10 in (17.02 m) tail height of a Boeing 787-9, two of which were on Taxiway C