@t-bltg The issue for Poisson will be fixed by https://github.com/JuliaStats/Distributions.jl/pull/1359 but this PR fixes the problem for any distribution (of course, the fallback is still only correct if the support of the distribution is actually a unit range).
Fix for the error in https://github.com/JuliaStats/Distributions.jl/issues/1358.
@t-bltg The issue for Poisson will be fixed by https://github.com/JuliaStats/Distributions.jl/pull/1359 but this PR fixes the problem for any distribution (of course, the fallback is still only correct if the support of the distribution is actually a unit range).