Personnel of agencies or any of their subordinate units whose services are terminated as a result of the implementation of this Code shall enjoy the rights and protection provided in Sections 5 and 6 of Republic Act numbered fifty-four hundred and thirty five and such other pertinent laws, rules and regulations. In any case, no lay-off shall be effected until funds to cover the gratuity and/or retirement benefits of those laid off are duly certified as available.