Custom entities: fix sprite collisions detected by others. Fix #456.