That second amendment of yours literally refers to a 'well-regulated militia': "A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed."
The 'well regulated' part is quite clearly intended as the premise for the 'right to bear arms not infringed' part.
IF NOT well-regulated, THEN right to bear = infringed.
Though the logic of that might be beyond your average NRA member.