Just tried your example and it worked perfectly !
I didn't know at all about this way of instancing a function's return values.
I honestly thought
var = MyElement:GetAnchor(MyElement.anchorIndex) would instance a table/array into 'var' that you could access via
offsetx = var.offsetX
Looks like I was wrong
So - another thumbs up and and hats down for you