Add bound checks and use correct index for m_vpsMaxTidIlRefPicsPlus1
This fixes out-of-bounds memory access that occurs when processing bistreams such as SPALSCAL_A_Qualcomm_3
This fixes out-of-bounds memory access that occurs when processing bistreams such as SPALSCAL_A_Qualcomm_3