Fix bug where the `defines/2` property would never be returned for dynamically created entities