Not sure if this is a bug or just my misunderstanding.
I am trying to make a mesh parent of another mesh without changing the transforms (position, rotation and scaling) of the child mesh in the world frame of reference
Similar to this discussion
Keep child's world position when parenting
As shown in the above discussion I use the following kind of function to do this
function makeParent(child, parent) {
var invParentMatrix = Matrix.Invert(parent.getWorldMatrix());