Several functions were called and then decided to return immediately
if indexonly was set. Most of those functions were called once or
twice but never from more than one place.
This change let the calling function decide if the call must be made
based on the value of indexonly which is always known.
The gain is mainly a reduction of the number of parameters passed to a
few functions. It also makes the code more readable as it is not
necessary to dig into the function to discover that it does nothing in
that case.