Yes, Han's ability is defined as an attack dice modifying ability, due to being a reroll. But it's the use of the Luke/Gunner upgrade that grants the second and separate attack, and that's why Han can be used twice. Although, to qualify for the second attack, you've still got to miss first, even after using Han's reroll.
Han's ability says "When attacking..." and Luke/Gunner's ability is a second attack so Han is within his parameters once more. The main thing to remember is an ability can be used once per opportunity and Luke/Gunner gives another opportunity to the active ship. That's why the Han/Gunner combo is so popular.
You are still only activating the one ship with all its upgrades. It's also why the Luke and Gunner cards have the last sentence stating you can't perform another attack this round. Otherwise you'd be endlessly looping until you finally hit.
Take the new Scum Boba Fett card for example. "When attacking or defending, you may reroll 1 of your dice for each enemy ship at Range 1." Put Gunner on that ship and you've got the same scenario as Han and Gunner.
Keyan Farlander or Ten Numb with the B-Wing/E2 upgrade and a gunner, same again. You get to use their ability for each attack. Kath Scarlet: each attack adds a stress token to the defender if they cancel a crit. The list is quite long. The Gunner and Luke cards were some of the very first upgrades to come out with crewed ships, and they've hardly changed since then. This is the way they were intended to be used.
I think you'll find that anyone that plays the Han/Gunner combo will play it like this. If they don't, they missing an opportunity. Simple as that.
Hastings, New Zealand
3 X-Wing, 2 A-Wing, 1 Y-Wing, 1 B-Wing, 1 E-Wing, 1 YT-1300
3 TIE Fighters, 3 TIE Int, 1 TIE Adv, 1 TIE Bomber, 1 TIE Phantom, 1 TIE Defender, 1 Firespray-31