Rfe on h1b transfer because of previous incorrect h1b approval

I think I have a unique case in which USCIS has first approved my case but now realized that they may have made mistake in the past when reviewing my H!B transfer request. What are my options? Here are more details:I graduated from US university with a STEM degree Dec 2012 and began working on OPT from Feb 2013. Company A has filed an H1B in April 2014, which was picked up in the lottery but subsequently was issued on RFE on July25. This RFE was responded to on Oct 7. After this, I found an opportunity with Company B, which filed a fresh H1B petition using the receipt number from the H1B filed by Company A on Nov 24 via Premium processing. At this time, the original petition was still under review and the new petition clearly stated that I have an existing petition which was issued an RFE, responded and is in review. This petition from company B was approved on Dec 3. Since the petition was approved, I joined this company B and started working from Dec 22. Later, I got to know that the H1B petition from employer A was denied. Since I already had the approval from employer B, I thought I should be okay and was not bothered about the denial. My H1B extension petition was also filed in April 2018 and received approval on Jun 2018… which is valid till Oct 2020.In Jul 2018, It so happened that I found and accepted another job with Company C. Company C filed my H1B transfer on Jul 30 2018. USCIS issued an RFE to this application saying that I was not cap-counted in 2014 as my first H1B petition from employer A was eventually denied. When I checked my notes, the attorneys from Company B clearly told me in 2014 that they can use the cap number that was used by the previous employer and they were 100% sure about it. But my current attorney from Company C, says that that was wrong . Company C attorney also says that USCIS may have erroneously approved the application earlier and may revoke it(the approval with company B) now altogether. Is this possible at all? So, right now, I don?t know which attorney to believe or what course of action to take. Looks like the attorney from company C has concluded that there is no way they can defend the situation since they tell me that RFE says that the USCIS believes that I was not subject to cap in 2014 and hence cannot be treated as a cap-exempt for this H1B Transfer.I am really confused and worried that things have gone south when I applied for this transfer and need some guidance on how to proceed.

I believe what your company C attorney says is true. USCIS might have made an error when they approved company B petition. You can only transfer approved petition from one employer to another, not the ones that are still under RFE. If company B used your company-A receipt number to say that your cap-exempt and for this to be valid, your initial petition that was picked in the lottery should have been approved.

Think logically, only approved petitions that go through lottery can be used for employer to employer transfers. If the petition that went through lottery was denied, how will account that you went through the lottery int he first place ? When USCIS itself tells you that you have not been accounted in the lottery before based on the above logic, there is nothing more your company C attorney can do now.

I would say that you apply for a new H1B in April 2019 and go through the lottery to make things right at this point in time.