No loophole just the usual inconsistencies at the patent office. When GATT brought about the June 1995 deadline for filing applications that could get the 17 yr from grant term, every law firm client filed tons of extra version of the same application to get extra chances to get pre-GATT patent term.
Issuance almost always takes a good 5 years, and if you're lucky it can drag on a few more. Then they got 4-6 "non-final" office actions which is probably because the patent office was generous or not doing their job very thoroughly in formulating rejections, and they took the maximum time to reply (6 months). Then probably they realized that things were going well and they embarked on requests to get extra responses (2-3 more years), and eventually put the case on patent office appeal, notoriously long (2-3 years...).
What is curious is that they must already had other patents in parallel, that weren't so lucky in getting delayed. Without knowing any details of these patents my guess is that attorneys will be planning to make some "double-patenting" challenges over patents with shorter terms...
Genentech achieved the same with their "Cabilly" patents to the dismay of many biotechs.
The law has now changed so these cases are pretty rare. However new rules are in place (patent term adjustement for delays in the PTO) and there are certainly people with clever strategies to game that as well.