The problem is happening in the track_and_override_login_redirect_mepr function. That function is hooked into with the MemberPress mepr-process-login-redirect-url filter. It may be possible to hook into this function and override it by checking for the query that have been set. This can be done with the wp_get_referer() function.
I don’t think I’ll have time to sort this out today, but I’ll take another look at it in the next few days.