cache refactoring: Remove continue statements from _args_cache_generate

Remove continue and goto statements from the large loop within
_args_cache_generate. This simplifies the sharing of parts of
the loop for future refactoring.

https://bugzilla.gnome.org/show_bug.cgi?id=640812