I also don't see any reason to specify both `$release` and `$version`. So if `$version` is specified regardless whether `$release` is specified or not the same install check could be used.

However it doesn't make sense to specify both `$version` and `$release` anyway. Either one of both is enough or one requests a version of a package from a specific release which isn't in this release (which will fail). So maybe `$release` and `$version` and should explicitly be mutually exclusive.