You're right! With a man-made law, exploiting a loophole is counter to the spirit of the law. However, Torah is divine, and hence perfect, so the "loophole" is also Torah. Think about it.
U.S. to deliver 8 advanced F-16s to Egypt on July 30-31, U.S. embassy in Cairo says (Reuters)
from the article: How to be religious - and enjoy a Shabbat espresso