D. The annual salary of each full-time deputy sheriff who is primarily a courtroom security officer, a correctional officer or a law-enforcement officer shall be determined by the sheriff in whose service he is employed and shall be reported to the Compensation Board by the sheriff at the time he files his report for the allowance of the expenses of his office as provided in § 15.2-1636.7 and at any time thereafter when the sheriff effects a change in the salary or employs a new such deputy sheriff. Such salaries as determined by the respective sheriff shall conform to the requirements set forth in subsection E and shall not in the aggregate exceed the aggregate allowance by the Compensation Board for personal services to the respective sheriffs for such deputy sheriffs. However, notwithstanding any contrary provisions of this section and of § 15.2-1636.8, the salary of any full-time deputy sheriff who, in addition to having primary duties related to courtroom security, corrections or law enforcement, also supervises other deputy sheriffs, or who is designated an investigator by the sheriff in whose services he is employed, shall be fixed and determined by the Compensation Board. Nothing in this section shall prohibit the Compensation Board from setting salary levels of civil process officers in localities having a population of more than one hundred thousand at a level equal to salary levels of deputy sheriffs who are primarily courtroom security, correctional, or law-enforcement officers.