Scan index: Fixed nil error when a Scan's Profile has been deleted

[Closes #38]