Add test coverage for build_userdata bug