I wouldn't really call what you are doing a work around as it is not a bug. It is intended behavior. Using problibs is just what you should do for local libraries that are linked to in your courses templates directories.
I don't see why you would use your hack to check for a slow down. If you have a symbolic link that has a large number of files and directories in it, then that is certainly the reason for the slow down. Recursively searching a directory takes time if it has a lot in it. So in that case, just add it to to problibs so it is skipped when searching for header files.
Also note that this is not specific to symbolic links. If you have a subdirectory of your templates directory that has a large number of subdirectories and files in it, then you can also add it to problibs to skip it in the search.
I don't see why you would use your hack to check for a slow down. If you have a symbolic link that has a large number of files and directories in it, then that is certainly the reason for the slow down. Recursively searching a directory takes time if it has a lot in it. So in that case, just add it to to problibs so it is skipped when searching for header files.
Also note that this is not specific to symbolic links. If you have a subdirectory of your templates directory that has a large number of subdirectories and files in it, then you can also add it to problibs to skip it in the search.