IDEA-112813 (Chain of instanceof checks: Support if/if/if/... chains)