The function SELECT_LEX::update_used_tables should process all ORDER BY lists in any subselect of a union.
Attach a file by drag & drop or click to upload