Check the layer's workspace id instead of given workspace. closes #193