[as3] do not generate TObjectDecl at block-level here as well (closes #3440)