as3: improved dependency handling