Fix bug in assembly cache lookup