This is only really needed in specific cases, e.g. localUser which isn't attached to a connection and thus needs a little help. Notes for when this is needed is added for future readers. (cherry picked from commit ef953b7574)
ef953b7574