Speed up hacking_has_correct_license

Make hacking_has_correct_license work the same way hacking_has_license
does, only run on first line.

using cProfile to measure cumtime:
before: 1.407
After:  0.526

Change-Id: Ie54feabc5893535310f14673766d8f306f3976d2
Merge "Speed up hacking_has_correct_license"