Maximal subgroups of infinite index in finitely generated linear groups