Wrapping an object in auto layout affects the internal objects’ auto-layout settings

I’m using this amazing hack to keep images’ aspect ratio. After the last update, each time I wrap such an image in auto layout, it looks like it affects the internal auto-layout settings.