Congestion on a Swindon motorway sliproad led to queues tailing back onto the main M4 carriageway during rush hour.