Not sure if this will make any difference but you are using setup_postdata() but you are not calling wp_reset_postdata().
Second problem, these are filters and you must return the value of $field back to ACF, which you are not doing in either filter You should be using add_filter() rather than add_action().
Somehow, and I can’t pin it down exactly, but you are causing an infinite loop when both of these filters run at the same time. This could be due to the problems I already gave or could be from something else.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users