When the principal contractor is liable to pay compensation under § 65.2-302 or § 65.2-303, he shall be entitled to indemnity from any person who would have been liable to pay compensation to the worker independently of such sections or from an intermediate contractor and shall have a cause of action therefor.
A principal contractor when sued by a worker of a subcontractor shall have the right to join that subcontractor or any intermediate contractor as a party.
Va. Code § 65.2-304