Find the domain of a composite function (#345)