fixed incorrect array access in solvepnp (which affected debug builds only)