I've changed the find_entity() error messages to asserts since this should be fixed by the previous patch.