It’s worth mentioning that the code above goes on the site where the DB is pulled/exported from (or best, on both sites).
I’m saying this because the first time I put the code only on the destination site, then tried pulling, and it didn’t work.
That said, I don’t know what the problem could be in your specific case. The filter is applied in get_preserved_options_queries()
function, on wpmdb.php
on line 1390
(WP Migrate DB Pro v1.8.1).