Narrows search_coded logic to only fire when flag set