Insert Keyframe function was not checking that an ID-block was given before trying to resolve the RNA-path using it.