Fix error that results in user lookups never succeeding for keystone users
Address a couple of dialyzer errors