Replace the assert with _fix_local_cache()

@lnussel, this is my proposal to fix this problem.  When OBS provide the expand '_build', we can rewrite this part.