cc2538: lpm: Fix several issues

See the commit messages for further details.