Switch to master branches for all submodules except for legalcode