Extracted FK resolving in transformation to RESULT_CACHE functions.