Back button behaviour for lazy loaded modules

I’ve just added two lazy loaded modules to my application, and they work fine except for the hardware back button. It does nothing on either module (one is a popover menu, the other is a page linked to in the menu). The page has the back button in the navbar, but pressing the hardware back button doesn’t do anything. I tried changing the back button behaviour on both these modules, but that changes the behavior app-wide, so that’s not an option for me. Is there something in the setup of a lazy loaded module that I might have to do to take care of this? History perhaps?

Why can’t you undo whatever you did to the back button when these pages unload?