WP_Query for Attachments not working as expected

From further tests it is now certain that WP_Query has been altered at some point in the last year to render it useless for searching attachments. As soon as you enter search criteria like categories or tags it always replaces the search for post type to: ‘.. IN ( post, page )’ or If you enter a tax_query for category and attachments you get the following SQL:

WP_Query array:

Array
(
    [fields] => ids
    [post_status] => inherit
    [post_type] => attachment
    [post_mime_type] => Array
        (
            [0] => image/jpeg
            [1] => image/png
        )

    [category_name] => bauerndorf
    [tax_query] => Array
        (
            [relation] => OR
            [0] => Array
                (
                    [taxonomy] => category
                    [field] => slug
                    [terms] => Array
                        (
                            [0] => Array
                                (
                                    [0] => bauerndorf
                                )

                        )

                    [operator] => IN
                )

        )

    [post__not_in] => Array
        (
            [0] =>
        )

    [nopaging] => 1
    [posts_per_page] => -1
    [orderby] => rand
)

Resulting SQL. No sign of searching for taxonomy however the third line following the WHERE statement is a killer criteria: ‘AND ( 0 = 1 )’ can never become true!!

SELECT wpq5_12_posts.ID FROM wpq5_12_posts  
WHERE 1=1  
AND wpq5_12_posts.ID NOT IN (0) 
AND ( 0 = 1 )
AND (wpq5_12_posts.post_mime_type="image/jpeg" OR wpq5_12_posts.post_mime_type="image/png")  
AND wpq5_12_posts.post_type="attachment" 
AND ((wpq5_12_posts.post_status="inherit")) 
GROUP BY wpq5_12_posts.ID ORDER BY RAND() 

I gave up searching for a solution using WP_Query.

Now the only solution to get my page to work again is to adapt the existing SQL statement to my needs and use a wpdb->get.