It appears you can’t have an ID in a Custom Component that starts with the letters preview, i.e. previewLoggedIn as an ID fails with the message:
I assume this is because preview is an Elements system ID and the parsing is stopping as soon as it finds a match on an Elements system ID?
Changing the ID to pvLoggedIn resolves the issue.
Not sure if this a bug or feature, but would prefer it to be a bug?