[quant][graphmode] Fix a corner case in handling `if` in insert_observers (#39615)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39615
corner case: https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py#L87
(Note: this ignores all push blocking failures!)
Test Plan: Imported from OSS
Differential Revision: D21942110
fbshipit-source-id: 9522032957575662d2648db2a41fa5410e8d1e3a