Refactor check_for_rekeyed_child() in quick_mode task