Merge "Partial revert "Add better errors for unresolved attributes, remove unused code"" into lmp-dev