The cargo you ran over was most likely a mine (diamond-shaped with 2 lights) rather than a cargo container. Oh wait - that's not what you had mentioned...
You can click on the cargo before you collect it to see what it is you know...not to mention that you can jettison it too if you'd accidently picked it up illegal cargo by mistake.
I'd for one expect that you couldn't run into other objects.
