construct_invocation: add missing check for jobs size