Clean up handling of PTLs in VPS

Avoid having a separate PTL count since we already have a size for the vector containing the PTLs.

Add a size check to avoid writing into inexistant PTL. This may avoid bug reports such as #1587

Merge request reports

Loading