This might actually tie in with another thread here. The "trews" being worn by the young gallant in that painting seem to be more what we call "tights" than trousers. Though he is clearly wearing flashes, the garment seems to be of one piece with his hose.

If this were the case, might not the sporran be the Scottish equivalent of the codpiece? That would account for the specifically Scottish style of wearing it.