This looks like a hole in the API, we should move this code lower for re-usability.