Use the static program id for Fd/Fd_ref instead of looking up the program. This should perhaps be put somewhere more central.
This should be apply, not safe_apply.