Implement layer offset nudging. Fixes #292