The three arrays delta_poc[], user[] and ref_id[] all have 17
entries. Therefore the loop limits determined by num_pics,
num_positive_pics and num_negative_pics must be checked for validity
before iterating over the arrays.
Fixes the following test cases of #1780:
explorer🆔000110,sig:11,src:000003,op:flip1,pos:0
explorer🆔000699,sig:11,src:002364,op:flip1,pos:138