Adding Smethie's fix for EntityGenTest.