Optimization. Skip other methods if main method is found.