Merge "Fix logic errors when checking the caller."