The returned priority must be in the allowed range.