Move pkgState.mutex.RLock() outside else statement so that entry is RLocked in both the creation and reading cases.
Move pkgState.mutex.RLock() outside else statement so that entry is RLocked in both the creation and reading cases.

open-lambda/open-lambda,open-lambda/open-lambda,open-lambda/open-lambda,open-lambda/open-lambda,open-lambda/open-lambda