Pull loop invariant code outside of the loop

askOption calls are expensive, and there’s no need to recompute
symbol-specific parts inside the loop over methods. This will improve
performance in UI code, like completions looking for parameter names.