Keyframes on collapsed layers not being created

I’ve just noticed that when I collapse my character’s master peg and create a keyframe, when I expand all layers the keyframe is still only on the master peg and not on all layers underneath it. Have I turned off a setting somewhere? I don’t want to have to manually add keyframes on all layers.

UPDATE: Ok, so I’ve noticed that if I right click and choose Insert Keyframe it only creates a keyframe on that particular layer whether all layers are collapsed or not. If I use the keyboard shortcut it works like I want it to. If I click the create keyframe button on the timeline toolbar it also works like it should.