Share duplicate logic in a private constructor.