[#2212] CID37619 and CID37556:
[#2212] CID37619 and CID37556:

Checked for negative return before using return to index array

PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,janiheikkinen/irods