Fix findPrimaryConnection() on in-memory connection repository to return null if no connection found.