A man who allegedly entered a mosque and claimed to have an AK-47 rifle is accused of offending against a second place of worship.