It is possible for a class without source (e.g. a teacher-provided test class) to depend on a class with source. If you edit the class with source, BlueJ 4.1.0 (and before) marks the class without source as needing a compile, even though it's impossible for us to recompile it without the source code. The state can only be reset to compiled by restarting BlueJ.
The correct fix here is to for us to cease marking any class without source as needs-compile.