Inlining function that's only used in one place.