According to this paper, two public keys are insecure if the corresponding private keys, f$f$ and f'$f'$ are too close to each other*. It follows that public keys are insecure if f=f'$f=f'$ regardless of the g$g$ values.
* ||f-f'|| < min(||f||, ||f'||)$\|f-f'\| < min(\|f\|, \|f'\|)$