Applications must ensure that all accesses to memory that backs image subresources used as attachments in a given renderpass instance either happen-before the load operations for those attachments, or happen-after the store operations for those attachments.
This requirement is not currently enforced by the validation layers, and the resulting bugs can be quite time consuming to track down.
A decent (but certainly non-exhaustive) start would be to add a check to ensure that none of the images bound as descriptors (and used by an active shader as defined in section 8.12) are also attachments for the current render pass.
The spec states in section 7.3 Framebuffers:
This requirement is not currently enforced by the validation layers, and the resulting bugs can be quite time consuming to track down.
A decent (but certainly non-exhaustive) start would be to add a check to ensure that none of the images bound as descriptors (and used by an active shader as defined in section 8.12) are also attachments for the current render pass.