Tracking bug with mixed up entities tables in rare cases