has_keys has better performance than 'in' for dict... reverting to old code