custom sorting media with multiple filters – error: not unique table/alias: wp_postmeta

Okay, I found the problem by debugging the query.

It was a generic LEFT JOIN added with the posts_join filter that has not alias the $wpdb->postmeta table which finally leads to the error.

So the sorting is working now without problems.