Collision layers are like onions if you want to know it's contents you have to combine all the layers together. Each layer has a unique bit/value so using a little math simply set the results of all interested layers.
Example
#layer1 value = 1, layer2 value=2 layer4 value8
$kinematicbody.set_collision_layer(11)
#layer1 value = 1, layer2 value=2 layer3 value4
$kinematicbody.set_collision_layer(7)
or use set_collision_layer_bit
to enable or disable
#Disable
$kinematicbody.set_collision_layer_bit(3, false)
#Enable
$kinematicbody.set_collision_layer_bit(4, true)