Fix render layout with collection

According to the documentation `render layout:` should
be able to render provided collection. Previously, render
failed with 'Missing partial'.

Fix #17224
Seems unrelated to the topic this PR is supposed to address? At the very least there should be a test for that case, but it seems like a separate issue.