The problem is deep in the initialization of staff types in Staff. This commit also tries to make handling of StaffType more "const correct" and adds some assertions which may lead to crashes (and helps detecting bad code).