A recent judgment from Hon’ble Bombay High Court also (like this one here) declared that application under section 340 has to be dealt with first before proceeding to main petition/case.
I am a little skeptical about this judgment as it refers to section 340 of Civil Procedure Code, not once but in almost every paragraph of the order.
Union Of India And Ors vs Haresh Virumal Milani on 26 April, 2018
This judgment is corrected in June 2018. It is available here.