wp-custom-menu filter removes the current_page_item class

After few hours of debugging I found out, that the wps_custom_nav_menu_items() actually receives the nav_menu_items with classes, applied by the _wp_menu_item_classes_by_context, but instead of using them, it reloads the entire menu from the database!
So if you change

$nav_items = wp_get_nav_menu_items( $menu_id );

To

$nav_items = $args;

(or just remove the line and rename the function argument), it works as expected.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)