LPS-45987 Implementing missing reference validation for layouts

Hey Brian,

This is quite straightforward, follows our existing patterns for these kind of code.

Thanks,

Máté