I don't think it's that complicated. If the pistol grip is attached, either bolted or simply pressed on, it's still attached and could get you in trouble. There is no subdividing "attached" here.
Your barrel length example is a bit different. If it's going to be considered part of the length of a barrel, it'll have to be part of the barrel, so it has to be welded, silver-soldered, blind-pinned or some other "permanent" manner. That's also very reasonable.
You're lucky though, California does not have a "constructive possession" law, so you probably would not be prosecuted for simply being in possession of the lower AND the pistol grip. "Constructive Possession" says that it doesn't matter if the gun, device, whatever is asembled or disassembled, if you have the parts you have the whole. I say "probably" because we've now seen how the AG (and DOJ as his enforcement arm) looks at the law the way he wants it to be, not the way it literally is, meaning don't get caught with your pistol grip slipped on but not bolted on. DOJ will not see it your way.
But this latest off-list lower DOJ memo should give you a bit of pause for ANYTHING that close to the line.