Rebase patch to silence resource_check_usage FIXME.